package excelBase;

import java.util.ArrayList;

import lib.SheetInLib;

public class RowContent extends BaseContent
{
	private int m_start;
	private int m_end;
	private SheetInLib m_sheet;
	
	public RowContent(SheetInLib sheet, int start)
	{
		super(sheet.getRow(start).getCell(0).getValue());
		m_children = new ArrayList<>();
		m_sheet = sheet;
		m_start = start;
	}
	
	public void setEnd(int end)
	{
		m_end = end;
	}
	
	public int getStart()
	{
		return m_start;
	}
	
	public int getEnd()
	{
		return m_end;
	}
	
	public void makeMember(ArrayList<Head> heads)
	{
		int len = heads.size();
		for(int i = 0; i < len; ++i)
		{
			m_children.add(new RowMember(m_sheet, heads.get(i), this));
		}
	}
}
